import FormHook from "@/hook/formHook";
import { reactive, ref } from "vue";

export default function InitHook() {
  const formState = ref<any>({});
  const tableData = ref<any>([]);
  const { resetFields } = FormHook({ formState });
  const loading = ref<boolean>(false);
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "修改送货仓库",
    width: "720px",
    type: 1,
    passData: {},
    component: "",
    visible: false
  });
  const drawerOpts = reactive<Base.DrawerOpts>({
    title: "修改送货仓库",
    width: "720px",
    type: 1,
    passData: {},
    component: "",
    visible: false
  });
  return {
    formState,
    loading,
    dialogOpts,
    drawerOpts,
    resetFields,
    tableData
  };
}
